#pragma once

using namespace System;
using namespace System::Timers;
using namespace System::Diagnostics;

// MyTimer
//
// Used to provide timer functionality, with additional
// custom functionality.

namespace CC3501_Main_GUI {

ref class MyTimer
{
public:
	// Time between timer ticks
	static const int sleepTime  = 100;

	MyTimer(void);
	void reset(void);
	void pause(void);
	void stop(void);
	void resume(void);
	void addTickHandler(ElapsedEventHandler^ eventHandler);	
	String^ getTimeString(void);
	void removeTickHandler(ElapsedEventHandler^ eventHandler);

private: 
	void handleTick(Object^ source, ElapsedEventArgs^ e);
	unsigned int tics;
	unsigned int timerInterval;
	System::Timers::Timer^ internalTimer;
};

}